Rename app.py to main.py in template#12628
Merged
davidfowl merged 1 commit intodotnet:mainfrom Nov 3, 2025
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12628Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12628" |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Python starter template to align the application structure with standard FastAPI conventions. The main change renames the Python application module from app.py to main.py and updates the Uvicorn app reference accordingly.
Key changes:
- Updated the Uvicorn ASGI import path from
"app:app"to"main:app"in apphost.cs - Added a new
main.pyfile containing the complete FastAPI application with weather forecast API, health check endpoint, Redis caching support (conditional), OpenTelemetry instrumentation, and static file serving
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apphost.cs | Updated the AddUvicornApp call to reference "main:app" instead of "app:app" to match the new module naming |
| app/main.py | New FastAPI application module with complete implementation including weather forecast API, optional Redis caching, health checks, and telemetry integration |
davidfowl
approved these changes
Nov 3, 2025
Member
|
/backport to release/13.0 |
Contributor
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19044636479 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the template apphost.cs a little easier to read. It also follows some standard conventions for file naming.